FROM centos:latest
MAINTAINER javamall.com.cn

ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo '$TZ' > /etc/timezone
ADD jdk-8u191-linux-x64.tar.gz /usr/java/

RUN mv /usr/java/jdk1.8.0_191 /usr/java/jdk

ENV JAVA_HOME=/usr/java/jdk
ENV JRE_HOME=/usr/java/jdk/jre
ENV CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
ENV PATH=$JAVA_HOME/bin:$PATH
ENV LANG C.UTF-8

ADD root /home
RUN chmod a+x /home/startup.sh

ENTRYPOINT sh /home/startup.sh $Jar $JAR_ARG "$JAVA_OPTS"
